<#include "header.ftl">
<style type="text/css">
.guesbook_size{
    margin: 10px 0;
    font-size: 18px;
}
.control-label{
	text-align: right !important;
}
.mtop10{
	margin-top:10px;
}
</style>
<!--main content start-->
	<section id="main-content">
		<section class="wrapper">
			<div class="row">
			<div class="col-lg-12">
			<section class="panel">
				<header class="panel-heading" style="font-size: 30px;">
					添加留言
				</header>
				<div class="panel-body">
					<form id="reply_message_form" method="post"
								class="form-horizontal tasi-form" autocomplete="off"
								action="${BASE_PATH}/guestbook/add.json">
						<div class="rows">
							<div class="col-xs-12 mtop10">
								<label class="col-sm-2 col-sm-2 control-label">姓名：</label>
								<div class="col-sm-10">
		                              <input type="text" style="font-size:15px;width: 200px;" class="form-control" name="name"
		                              	placeholder="姓名" id="name" >
		                              </input>
		                          </div>
							</div>		
						</div>
						<div class="rows">
							<div class="col-xs-12 mtop10">
								<label class="col-sm-2 col-sm-2 control-label">邮箱：</label>
								<div class="col-sm-10">
		                              <input type="text" style="font-size:15px;width: 200px;" class="form-control" name="email"
		                              	placeholder="邮箱" id="email" >
		                              </input>
		                        </div>
							</div>		
						</div>
						<div class="rows">
							<div class="col-xs-12 mtop10">
								<label class="col-sm-2 col-sm-2 control-label">标题：</label>
								<div class="col-sm-10">
		                              <input type="text" style="font-size:15px;width:600px;" class="form-control" name="title"
		                              	placeholder="标题" id="title" >
		                              </input>
		                        </div>
							</div>		
						</div>
						<div class="rows">
							<div class="col-xs-12 mtop10">
								<label class="col-sm-2 col-sm-2 control-label">内容：</label>
								<div class="col-sm-10">
		                              <textarea style="width:600px;height:150px;font-size:15px;" name="content" id="content"></textarea>
		                        </div>
							</div>							
						</div>
						<div class="rows">
							<div class="col-xs-12 mtop10">
								<label class="col-sm-2 col-sm-2 control-label"></label>
								<div class="col-sm-10">
		                              <button type="submit" class="btn btn-shadow btn-primary">发布</button>
		                        </div>
							</div>	
						</div>
					</form>
				</div>
			</section>
		</div>
		</div>
		</section>
	</section>
 <!--main content end-->
<script type="text/javascript">
	$(function(){
		$('#reply_message_form').ajaxForm(function(data){
			if(data.result){
				bootbox.alert("保存成功，您的意见将在审核后即可显示到页面中。",
			   		function() {
                    	window.location.href = "${BASE_PATH}/folder/"+${folderId}+".htm";
                	});
			}else{
				bootbox.alert("保存失败！有部分字段未填写。");
			}
		});	
	});
</script>
<#include "footer.ftl">